﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;

namespace EAEcoreAddin.SQLWrapperClasses
{
    /*
     *Created by Alexander Schleich
     *for EMoflon:
     *http://www.moflon.org/emoflon/
     */
    class EAConnectorTag : EA.ConnectorTag
    {

        SQLRepository repository;
        String xmlTaggedValue;

        public EAConnectorTag(SQLRepository repository, String xmlTaggedValue)
        {
            this.repository = repository;
            this.xmlTaggedValue = xmlTaggedValue;
        }
        #region IDualConnectorTag Members

        public int ConnectorID
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public string FQName
        {
            get { throw new NotImplementedException(); }
        }

        public string GetLastError()
        {
            throw new NotImplementedException();
        }

        public string Name
        {
            get
            {
                return EAEcoreAddin.Util.EAUtil.getXMLNodeContentFromSQLQueryString(xmlTaggedValue, "Property")[0];    
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public string Notes
        {
            get
            {
                String notes = EAEcoreAddin.Util.EAUtil.getXMLNodeContentFromSQLQueryString(xmlTaggedValue, "NOTES")[0];
                notes = HttpUtility.HtmlDecode(notes);
                return notes;
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public EA.ObjectType ObjectType
        {
            get { throw new NotImplementedException(); }
        }

        public string TagGUID
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public int TagID
        {
            get { throw new NotImplementedException(); }
        }

        public bool Update()
        {
            throw new NotImplementedException();
        }

        public string Value
        {
            get
            {
                return EAEcoreAddin.Util.EAUtil.getXMLNodeContentFromSQLQueryString(xmlTaggedValue, "VALUE")[0];
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        #endregion

        #region IDualConnectorTag Members


        public string GetAttribute(string PropName)
        {
            throw new NotImplementedException();
        }

        public bool HasAttributes()
        {
            throw new NotImplementedException();
        }

        public bool SetAttribute(string PropName, string PropValue)
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}
